/**
 * Created by shirenchuang on 2017/3/16.
 */

import com.dubbo.service1.Test1Service1;
import com.dubbo.service1.Test2Service1;
import com.dubbo.service3.Test1Service3;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Consumer1 {



    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]
                {"applicationContext.xml"});
        context.start();

        Test1Service1 test1Service1 = (Test1Service1)context.getBean("test1Service1Impl"); // 获取远程服务代理
        String s0 = test1Service1.test1Service1_1(); // 执行远程方法
        String s = test1Service1.test11_21();

        Test2Service1 test2Service1 = (Test2Service1)context.getBean("test2Service1"); // 获取远程服务代理
        String s1 = test2Service1.test2Service1_1();


        System.out.print(s0+s+"end.......");
    }

}